import java.util.ArrayList;


public class Board {
	private ArrayList<OilField> oilFields;
	private ArrayList<Edge> edges;
	private ArrayList<Team> teams;
	private int size;
	private int numberOfTeams;
	
	public Board(int size, int numberOfTeams) {
		this.size = size;
		this.numberOfTeams = numberOfTeams;
		oilFields = new ArrayList<OilField>();
		edges = new ArrayList<Edge>();
		teams = new ArrayList<Team>();
	}
	
	public ArrayList<OilField> getOilFields() {
		return oilFields;
	}

	public ArrayList<Edge> getEdges() {
		return edges;
	}

	public ArrayList<Team> getTeams() {
		return teams;
	}

	public int getSize() {
		return size;
	}

	public int getNumberOfTeams() {
		return numberOfTeams;
	}
	public void setEdges()
	{
		int numberOfEdges = 0;
		for(int i=0; i < size; i++)
		{
			for(int j=0; j < (size-1); j++)
			{
				Position endpoint1 = new Position(i,j);
				Position endpoint2 = new Position(i,j+1);
				Edge newEdge = new Edge(endpoint1,endpoint2);
				edges.add(newEdge);
				numberOfEdges++;
				System.out.println(newEdge);
			}
		}
		for(int i=0; i < size; i++)
		{
			for(int j=0; j < (size-1); j++)
			{
				Position endpoint1 = new Position(j,i);
				Position endpoint2 = new Position(j+1,i);
				Edge newEdge = new Edge(endpoint1,endpoint2);
				edges.add(newEdge);
				numberOfEdges++;
				System.out.println(newEdge);
			}
		}
		System.out.println(numberOfEdges+" edges generated");
	}
	
}
